import axios from "@/http.js";
// 订单相关

// 创建交易订单
export const post_create_order = (data) => {
    return axios.request({
        url: '/order.v1/order/createOrder',
        method: 'post',
        data
    })
}
// 获取交易订单参数get
export const get_create_order = (params) => {
    return axios.request({
        url: '/order.v1/order/createOrder',
        method: 'get',
        params: params
    })
}
// 修改订单
export const post_amend_order = (data) => {
    return axios.request({
        url: '/order.v1/order/amendOrder',
        method: 'post',
        data
    })
}
// 获取下单必要参数
export const get_amend_order = (params) => {
    return axios.request({
        url: '/order.v1/order/amendOrder',
        method: 'get',
        params: params
    })
}
// 取消订单
export const post_cancel_order = (data) => {
    return axios.request({
        url: '/order.v1/order/cancelOrder',
        method: 'post',
        data
    })
}
// 修改止盈止损
export const post_setTarget = (data) => {
    return axios.request({
        url: '/order.v1/order/setTarget',
        method: 'post',
        data
    })
}
// IPO下单
export const post_IPO_create = (data) => {
    return axios.request({
        url: '/order.v1/IPO/create',
        method: 'post',
        data
    })
}
// 获取下单必要参数
export const get_IPO_create = (params) => {
    return axios.request({
        url: '/order.v1/IPO/create',
        method: 'get',
        params: params
    })
}
// IPO撤单
export const get_IPO_cancel = (params) => {
    return axios.request({
        url: '/order.v1/IPO/cancel',
        method: 'get',
        params: params
    })
}
// 货币兑换
export const post_exchange = (data) => {
    return axios.request({
        url: '/order.v1/exchange/confirm',
        method: 'post',
        data
    })
}
// 获取兑换必要参数
export const get_exchange = (params) => {
    return axios.request({
        url: '/order.v1/exchange/confirm',
        method: 'get',
        params: params
    })
}
// 交易记录
export const get_trade_record = (params) => {
    return axios.request({
        url: '/order.v1/tradeRecord/record',
        method: 'get',
        params: params
    })
}
// 资金账户列表
export const get_asset_list = (params) => {
    return axios.request({
        url: '/order.v1/asset/list',
        method: 'get',
        params: params
    })
}
// 交易动态
export const get_chargeRecord = (params) => {
    return axios.request({
        url: '/order.v1/tradeRecord/chargeRecord',
        method: 'get',
        params: params
    })
}
// 总账户
export const get_asset_master = (params) => {
    return axios.request({
        url: '/order.v1/asset/master',
        method: 'get',
        params: params
    })
}
// 获取下单必要参数证券账户
export const get_securities = (params) => {
    return axios.request({
        url: '/order.v1/asset/securities',
        method: 'get',
        params: params
    })
}
// 资金记录
export const get_asset_record = (params) => {
    return axios.request({
        url: '/order.v1/asset/record',
        method: 'get',
        params: params
    })
}
// 兑换记录
export const get_exchange_record = (params) => {
    return axios.request({
        url: '/order.v1/exchange/record',
        method: 'get',
        params: params
    })
}
// 批量撤单接口
export const post_batchCancelOrder = (data) => {
    return axios.request({
        url: '/order.v1/order/batchCancelOrder',
        method: 'post',
        data
    })
}
